package com.jeecms.wicool.manager.share.impl;

import com.jeecms.common.hibernate3.Updater;
import com.jeecms.common.page.Pagination;
import com.jeecms.wicool.dao.share.FoodShareDao;
import com.jeecms.wicool.entity.share.FoodShare;
import com.jeecms.wicool.manager.share.FoodShareMng;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by cuiyanlei on 15/6/17.
 */
@Transactional
@Service
public class FoodShareMngImpl implements FoodShareMng {
    @Override
    public FoodShare save(FoodShare bean) {
        return dao.save(bean);
    }

    @Override
    public FoodShare deleteById(Integer id) {
        return dao.deleteById(id);
    }

    @Override
    public FoodShare updateByUpdater(Updater<FoodShare> updater) {
        return dao.updateByUpdater(updater);
    }

    @Override
    public FoodShare findById(Integer id) {
        return dao.findById(id);
    }

    @Override
    public Pagination getPage(String title, String content, Integer pageNo, Integer pageSize) {
        return dao.getPage(title, content, pageNo, pageSize);
    }

    @Autowired
    private FoodShareDao dao;
}
